#ifndef _ACCEPTOR_H
#define _ACCEPTOR_H
#include "Socket.h"
#include "InetAddress.h"

class Acceptor {
public: 
    Acceptor(const string& ip, unsigned short port);
    void ready();
    void setReuseAddr();
    void setReusePort();
    void bind();
    void listen();
    int accept();
    int fd();
    ~Acceptor();
private:
    Socket _sock;
    InetAddress _addr;
};

#endif //_ACCEPTOR_H
